package com.jackstraw.jack_base.datasource.jpa.entity.po;

import com.jackstraw.jack_base.datasource.jpa.base.entity.po.JpaPo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;


/**
 * 用户表	实体层
 *
 * @author jack 945514650@qq.com
 * @since version:1.0 generatorDate:2022-05-14 10:53:28
 */
@Data
@Entity
@Table(name = "user")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class User2Po extends JpaPo<User2Po, Long> {


    /**
     * 用户名
     */
    @Column(name = "name")
    private String name;

    /**
     * 出生日期
     */
    @Column(name = "email")
    private String email;

    /**
     * 年龄
     */
    @Column(name = "age")
    private Integer age;
    /**
     * 主键
     */
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Override
    protected String idFieldName() {
        return "id";
    }
}